package com.springvue.springvue.controller;


import com.springvue.springvue.config.JsonResult;
import com.springvue.springvue.service.NewsSerivce;
import com.springvue.springvue.service.UserSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@RestController
@RequestMapping(value = "/news222")

public class News {
    @Autowired


    private NewsSerivce newsSerivce;
    private UserSevice userSevice;

    @PostMapping("/list")
    public JsonResult<List> list(){

        List RestData=newsSerivce.list();
        return new JsonResult<>(RestData);
    }


}
